class Node:
    def __init__(self, value, left=None, right=None):
        self.value = value
        self.left = left
        self.right = right


if __name__ == '__main__':
    head = Node(0, None, None)
    head.left = Node(1, None, None)
    head.right = Node(2, None, None)


    def f(h):
        if h is None:
            return
        f(h.left)
        print(h.value)
        f(h.right)


    f(head)
